﻿<%@ Page Language="C#" MasterPageFile="~/teachers/masterpage.Master" AutoEventWireup="true" CodeBehind="TSProfile.aspx.cs" Inherits="ESCHOOL.teachers.WebForm10" Title="Student profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style11
        {
            width: 869px;
        }
        .style7
        {
            width: 62%;
        }
        .style8
        {
            height: 169px;
        }
        .style9
        {
            width: 503px;
        }
        .style10
        {
            width: 170px;
        }
    </style>
    
</asp:Content>
<asp:Content ID="Content2" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

                    <p>
                        &nbsp;</p>
                    <table class="style11">
                        <tr>
                            <td>
                    <asp:Panel ID="Panel2" runat="server">
                        <table class="style9">
                            <tr>
                                <td class="style10">
                                    &nbsp;</td>
                                <td>
                                    <asp:TextBox ID="tbstudentid" runat="server" Visible="False"></asp:TextBox>
                                    <asp:TextBox ID="tbregistration" runat="server" Visible="False"></asp:TextBox>
                                    <asp:Image ID="Image2" runat="server" Visible="False" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Enrollment No</td>
                                <td>
                                    <asp:TextBox ID="tbenroll" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="validatorenroll" runat="server" 
                                        ControlToValidate="tbenroll" ErrorMessage="plz enter valid enrollno"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Roll No</td>
                                <td>
                                    <asp:TextBox ID="tbroll" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Class</td>
                                <td>
                                    <asp:TextBox ID="tbclass" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Year Of Studing</td>
                                <td>
                                    <asp:DropDownList ID="ddyearstuding" runat="server" 
                                        onselectedindexchanged="ddyearstuding_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Student Name</td>
                                <td>
                                    <asp:TextBox ID="tbstudname" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                        ControlToValidate="tbstudname" ErrorMessage="Plz enter name"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Date Of Birth</td>
                                <td>
                                    <asp:DropDownList ID="dddate" runat="server" 
                                        onselectedindexchanged="dddate_SelectedIndexChanged">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddmonth" runat="server" 
                                        onselectedindexchanged="ddmonth_SelectedIndexChanged">
                                        <asp:ListItem Value="1">Jan</asp:ListItem>
                                        <asp:ListItem Value="2">Feb</asp:ListItem>
                                        <asp:ListItem Value="3">Mar</asp:ListItem>
                                        <asp:ListItem Value="4">Apr</asp:ListItem>
                                        <asp:ListItem Value="5">May</asp:ListItem>
                                        <asp:ListItem Value="6">Jun</asp:ListItem>
                                        <asp:ListItem Value="7">Jul</asp:ListItem>
                                        <asp:ListItem Value="8">Aug</asp:ListItem>
                                        <asp:ListItem Value="9">Sep</asp:ListItem>
                                        <asp:ListItem Value="10">Oct</asp:ListItem>
                                        <asp:ListItem Value="11">Nov</asp:ListItem>
                                        <asp:ListItem Value="12">Dec</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddyear" runat="server" 
                                        onselectedindexchanged="ddyear_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Gender</td>
                                <td>
                                    <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="19px" 
                                        RepeatDirection="Horizontal" Width="169px">
                                        <asp:ListItem Value="f">Female</asp:ListItem>
                                        <asp:ListItem Value="m">Male</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Photo</td>
                                <td>
                                    <asp:FileUpload ID="FileUpload1" runat="server" />
                                    <asp:TextBox ID="TextBox1" runat="server" Visible="False"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Permanent Address</td>
                                <td>
                                    <asp:TextBox ID="tbpaddess" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                        ControlToValidate="tbpaddess" ErrorMessage="Enter full address"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Contact No(Resi.)</td>
                                <td>
                                    <asp:TextBox ID="tbrespno" runat="server"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                        ControlToValidate="tbrespno" ErrorMessage="use: (0XXXXXXXXX) format" 
                                        ValidationExpression="(0\d{9})"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Mobile No</td>
                                <td>
                                    <asp:TextBox ID="tbmobile" runat="server"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                        ControlToValidate="tbmobile" ErrorMessage="No not valid" 
                                        ValidationExpression="(\d{10})"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    Student Email Id</td>
                                <td>
                                    <asp:TextBox ID="tbstudmail" runat="server"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                        ControlToValidate="tbstudmail" ErrorMessage="Ex. (abc@gmail.com)" 
                                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    User Type</td>
                                <td>
                                    <asp:DropDownList ID="ddusertype" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    <asp:Label ID="labusername" runat="server" Text="Username"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="tbusername" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    <asp:Label ID="labpassword" runat="server" Text="Password"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="tbpassword" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                    <asp:Button ID="btninsert" runat="server" onclick="btninsert_Click" 
                                        Text="Insert" />
                                </td>
                                <td>
                                    <asp:Button ID="btnupdate" runat="server" Text="Update" 
                                        onclick="btnupdate_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td class="style10">
                                
                                    <br />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="2">

                    <asp:Panel ID="Panel1" runat="server" ScrollBars="Auto">
                        <table class="style7">
                            <tr>
                                <td colspan="2">
                                    <asp:DropDownList ID="ddclass" runat="server" 
                                        onselectedindexchanged="ddclass_SelectedIndexChanged" AutoPostBack="True"
                                        >
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="style8">
                                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                        onrowdeleting="GridView2_RowDeleting" onrowediting="GridView2_RowEditing" 
                                        AllowPaging="True" onpageindexchanging="GridView2_PageIndexChanging">
                                        <Columns>
                                            <asp:BoundField DataField="student_name" HeaderText="Student Name" />
                                            <asp:BoundField DataField="enrollment_no" HeaderText="Enrollment No" />
                                            <asp:BoundField DataField="roll_no" HeaderText="Roll No" />
                                            <asp:TemplateField HeaderText="Date of Birth">
                                            <ItemTemplate><%#Eval("date_of_birth","{0:d}") %></ItemTemplate></asp:TemplateField>
                                            <asp:BoundField DataField="mobile_no" HeaderText="Contact No" />
                                            <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                                            <asp:TemplateField HeaderText="Parent Info">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="hlparentinfo" runat="server" 
                                                        NavigateUrl='<%# "~/teachers/TPProfile.aspx?id="+Eval("student_id") %>'>Parent 
                                                    Info</asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                    <p>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    </p>
                                    <p>
                                        &nbsp;</p>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;</td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <p>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>

                                <asp:Panel ID="Panel3" runat="server" ScrollBars="Auto" Width="664px">
                                    <p>
                                    </p>
                                    <p>
                                    </p>
                                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                    onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                                    AllowPaging="True" 
    onpageindexchanging="GridView1_PageIndexChanging" Width="410px">
                                        <Columns>
                                            <asp:BoundField DataField="student_name" HeaderText="Student Name" />
                                            <asp:BoundField DataField="enrollment_no" HeaderText="Enrollment no" />
                                            <asp:BoundField DataField="roll_no" HeaderText="Roll no" />
                                            <asp:TemplateField HeaderText="Date of Birth">
                                                <ItemTemplate>
                                                    <%#Eval("date_of_birth","{0:d}") %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="mobile_no" HeaderText="Contact No" />
                                            <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                                            <asp:TemplateField HeaderText="Edit">
                                                <ItemTemplate>
                                                    <asp:Button ID="btnedit" runat="server" 
                                            CommandArgument='<%# Eval("student_id") %>' CommandName="Edit" 
                                            oncommand="btnedit_Command" Text="Edit" CausesValidation="False" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Delete">
                                                <ItemTemplate>
                                                    <asp:Button ID="btndelete" runat="server" 
                                            CommandArgument='<%# Eval("student_id") %>' CommandName="Delete" 
                                            oncommand="btndelete_Command" Text="Delete" CausesValidation="False" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Parent Info">
                                                <ItemTemplate>
                                                    <asp:HyperLink ID="hlparent" runat="server" 
                                            NavigateUrl='<%# "~/teachers/TPProfile.aspx?id="+Eval("student_id") %>'>Parent Info</asp:HyperLink>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </asp:Panel>
                                <p>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                        &nbsp;</p>

                            </td>
                        </tr>
                        </table>

</asp:Content>

